# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Modified from extra/xdg-desktop-portal-kde; original contributors:
# Contributor: Antonio Rojas <arojas@archlinux.org>

pkgname=xdg-desktop-portal-lxqt
pkgver=0.4.0
pkgrel=1
pkgdesc='A backend implementation for xdg-desktop-portal using Qt/KF5/libfm-qt'
arch=(loong64 x86_64)
url='https://github.com/lxqt/xdg-desktop-portal-lxqt'
license=(LGPL)
depends=(qt5-base kwindowsystem xdg-desktop-portal libfm-qt)
makedepends=(cmake)
provides=(xdg-desktop-portal-impl)
source=("https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
sha256sums=('e55c6c87186ca39272efab6a3b79c418b6e16d09d8748dd0ad05165a18e7b2b0'
            'SKIP')
validpgpkeys=(
  "19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
